// import GAsideMenu from "@/components/GAsideMenu.vue"
// import GBreadcrumb from "@/components/GBreadcrumb.vue"
// import GDropdown from "@/components/GDropdown.vue"
// import GFormCreator from "@/components/GFormCreator.vue"
// import GTable from "@/components/GTable.vue"
// import GColumn from "@/components/GColumn.vue"
// import GSearchQuery from "@/components/GSearchQuery.vue"
// // 自动引动 require.context('../components/xxx',true,/\.vue$/)
// // const Assembly=require.context('../components',true,/\.vue$/)
// function install(Vue) {
//     Vue.component(GAsideMenu.name, GAsideMenu);
//     Vue.component(GBreadcrumb.name, GBreadcrumb);
//     Vue.component(GDropdown.name, GDropdown);
//     Vue.component(GFormCreator.name, GFormCreator);
//     Vue.component(GTable.name, GTable);
//     Vue.component(GColumn.name, GColumn);
//     Vue.component(GSearchQuery.name, GSearchQuery);
// }

// 自动引入
const Assembly=require.context('../components',true,/\.vue$/)
function install(Vue) {
    let AssemblyNameObj=[];
    Assembly.keys().forEach(filepath => {
        const AssemblyObj = Assembly(filepath);
        AssemblyNameObj.push({...AssemblyObj.default});
    })
    for (let i = 0; i < AssemblyNameObj.length; i++) {
        Vue.component(AssemblyNameObj[i].name, AssemblyNameObj[i]);
    }
}
export default {
    install
}